package hn.cch.spring_boot_redis.message;

public class RedisResponse {

    private String code;
    private String key;
    private String value;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static RedisResponse success(){
        RedisResponse redisResponse = new RedisResponse();
        redisResponse.setCode("success");
        return redisResponse;
    }

    public static RedisResponse fail(){
        RedisResponse redisResponse = new RedisResponse();
        redisResponse.setCode("fail");
        return redisResponse;
    }

}
